with taso_abstract.class.Dans;
package body taso_abstract.implementation is


   function Creer return tas is
   begin
      return (taso_abstract.tas with s => Creer);
   end;

   function Mettre(T : tas; x : objet) return tas is
   begin
      return (taso_abstract.tas with s => Mettre(T.s, x));
   end;

   function Retirer(T : tas; x : objet) return tas is
   begin
      return (taso_abstract.tas with s => Retirer(T.s, x));
   end;

   function Dans(T : tas; x: objet) return boolean is
   begin
      if Access_Dans = null then
         declare
            package instance_class is new class;
            function instance_dans is new instance_class.Dans;
         begin
            return instance_dans(T, X);
         end;
      else
         return Access_Dans.all(T.s, x);
      end if;

   end;

   function Taille(T : tas) return natural is
   begin
      return Access_Taille(T.s);
   end;

   function Ieme(T : tas; i : natural) return objet is
   begin
      return Access_Ieme(T.s, i);
   end;


end taso_abstract.implementation;
